@extends('layout.admin')

@section('title')
<title>分类列表</title>
@endsection

@section('content')
  <div class="row"> 
   <div class="col-lg-12">

    <div class="panel"> 

     <div class="panel-heading bk-bg-primary"> 
      <h6><i class="fa fa-table red"></i><span class="break">分类列表</span></h6> 
      <div class="panel-actions"> 
       <a class="btn-setting" href="#"><i class="fa fa-rotate-right"></i></a> 
       <a class="btn-minimize" href="#"><i class="fa fa-chevron-down"></i></a> 
       <!-- <a class="btn-close" href="#"><i class="fa fa-times"></i></a>  -->
      </div> 
     </div>

     <div class="panel-body"> 
      <div class="table-responsive"> 
       <table class="table table-striped table-bordered table-hover bootstrap-datatable datatable"> 
        <thead> 
         <tr> 
          <th>ID</th> 
          <th>分类名称</th>  
          <!-- <th>PID</th>   -->
          <th>操作</th> 
         </tr> 
        </thead> 
        <tbody> 
         @foreach($cates as $k=>$v)
         <tr> 
          <td>{{$v['id']}}</td> 
          <td>{{$v['name']}}</td> 
          <!-- <td>{{$v['pid']}}</td>  -->
          <td class="hidden-480">
          <a href="/cate/{{$v->id}}/edit" class="btn btn-info btn-sm pull-left" style="margin-right:5px"><i class="fa fa-edit"></i></a> 
          <form action="/cate/{{$v->id}}" method="post">
			  <input type="hidden" name="_method" value="delete">
			    {{csrf_field()}}
			  <button class="btn btn-danger btn-sm"><i class="fa fa-trash-o"></i></button>
          </form>
          </td> 
         </tr> 
         @endforeach 
        </tbody> 
       </table>
      </div> 
     </div> 
    </div> 
   </div> 
  </div>
@endsection